<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/admin/include/init_admin.jsp" %>
<%@ page import="com.joinhawaii.admin.product.*" %>
<%

	String hotel_id		= StringUtil.nvl(request.getParameter("hotel_id"));


	ProductDAO dao 		= new ProductDAO();


	HashMap infos = new HashMap();
	infos.put("hotel_id",	hotel_id);


	//HashList roomList 	= dao.selectHotelRoomList(infos);
	HashList priceList	= dao.selectRoomPriceList(infos);

%>
				<form  id="#priceSaveForm" method="post" action="">
				<input type="hidden" name="hotel_id" value="<%= hotel_id %>"/>
				<table cellpadding="0" cellspacing="0" class="table_03 mt5">
				<colgroup>
					<col/>
					<col width="100px"/>
					<col width="100px"/>
					<col width="80px"/>
					<col width="80px"/>
					<col width="80px"/>
					<col width="80px"/>
				</colgroup>
				<tbody id="price">
					<tr>
						<th><p>객실명</p></th>
						<th><p>시작일</p></th>
						<th><p>종료일</p></th>
						<th><p>원가</p></th>
						<th><p>판매가</p></th>
						<th><p>B2B</p></th>
						<th class="brx"><p>삭제</p></th>
					</tr>
				<%	for (int i = 0; i < priceList.size(); i++) { %>
					<tr>
							<td class="l">
								<a href="#nohref" onclick="btn_Update('<%= priceList.get("room_id",i) %>')">
									<%= priceList.get("room_name", i) %>
								<%	if (!"".equals(priceList.get("room_desc",i))) { %>
										(<%= priceList.get("room_desc", i) %>)
								<%	} %>
								</a>
							</td>
							<td><%= StringUtil.toDate(priceList.get("from_date", i)) %></td>
							<td><%= StringUtil.toDate(priceList.get("to_date", i)) %></td>

				<%		if ("".equals(priceList.get("from_date",i))) { %>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
				<%		} else { %>
							<td>
								<input type="hidden" name="list.job_type" value="X" />
								<input type="hidden" name="list.room_id" value="<%= priceList.get("room_id", i) %>"/>
								<input type="hidden" name="list.from_date" value="<%= priceList.get("from_date", i) %>"/>
								<input type="text" name="list.cost" value="<%= priceList.get("cost", i) %>" class="wmax r"/>
							</td>
							<td><input type="text" name="list.sales_price" value="<%= priceList.get("sales_price", i) %>" class="wmax r"/></td>
							<td><input type="text" name="list.b2b_price" value="<%= priceList.get("b2b_price", i) %>" class="wmax r"/></td>
							<td><input type="checkbox" name="list.chk"/>
				<%		} %>
					</tr>
				<%	} %>
				</tbody>
				</table>
				<script>
            	func_row_merge_Item(price, 1, 0);
				</script>

				</form>

